package com.popcorn.member.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.popcorn.action.Action;
import com.popcorn.action.ActionForward;
import com.popcorn.member.dao.MemberDAO;
import com.popcorn.member.model.MemberVo;

public class MemberCheckAction_ID implements Action {

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		MemberDAO dao = new MemberDAO();
		ActionForward forward = new ActionForward();
		boolean result = false;
		
		String id = request.getParameter("member_id");
		result = dao.id_check(id);
		
		forward.setRedirect(false);
		forward.setPath("/main/main.jsp");
		if(result) return forward;
		else return null;
	}

}
